import Store from 'react-native-store';

const LASTUSERSTATE = 0;

class UserState{
  constructor(){
    this._state = Store.model('user_state');
  }

  getState(){
    return this._state.findById(LASTUSERSTATE);
  }

  setState(state){
    return this._state.add({...state, _id:LASTUSERSTATE});
  }
}

export default new UserState();
